package com.banmao.mall.mapper;

import com.banmao.mall.model.bo.admin.goods.ProductBO;
import com.banmao.mall.model.pojo.GoodsProduct;
import com.banmao.mall.model.vo.client.goods.ProductVO;
import org.apache.ibatis.annotations.Param;

import javax.annotation.security.PermitAll;
import java.util.List;

public interface GoodsProductMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(GoodsProduct record);

    int insertSelective(GoodsProduct record);

    GoodsProduct selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(GoodsProduct record);

    int updateByPrimaryKey(GoodsProduct record);

    Integer selectTotalCount();

    List<ProductVO> selectByGoodsID(Integer goodsId);

    int insertProduct(@Param("goodsId") Integer goodsId, @Param("product") ProductBO product);

    List<com.banmao.mall.model.vo.admin.goods.ProductVO> selectProductByGoodsID(Integer goodsId);

    int insertProductWithUpdate(ProductBO product);



    GoodsProduct selectByGoodsIdAndSpe(Integer goodsId, String[] specifications);

    void deleteAllByGoodsID(Integer id);
}